<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
<<<<<<< HEAD
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <!--标准mui.css-->
    <!-- <link rel="stylesheet" href="/Public/Css/css/mui.min.css" /> -->
    <style>body{background-color: #FFF;}</style>
    <script src="/Public/js/mui.min.js"></script>
    <!--标准muiEND-->
    <link rel="stylesheet" type="text/css" href="/Public/Css/wx_login.css?1">

    <script src="//libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <title>注册</title>
</head>
<style>
    .btn_yanzheng1 img {
        float: right;
        margin-right: 3%;
        margin-left: 0!important;
    }
    .register{
        top:50px;
    }
    .blogo{
        margin-top: 80px;
        margin-left: 30px;
    }
    .blogo h4{
        color:#000;

    }
    .blogo p{
        color:#797979;
        font-size: 14px;
        /* margin-top: -20px; */
    }
    .tabs{
        padding:30px;
    }
    .reg input{
        width: 100%;
        /* border: 1px solid gray; */
        font-size:0.8em!important;
        /*margin-left: 0;*/
    }
    .reg .reg_code {
        display: inline-block;
        height: 36px;
        line-height: 36px;
        font-size: 14px;
    }
    .reg_code {
        color: #14b941;
        text-decoration:none;
        text-decoration: none;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
        -webkit-user-select: none;
        -moz-user-focus: none;
        -moz-user-select: none;
    }
    .agreement {
        color: #797979;
        margin-top: 12px;
        font-size: 12px;
        text-align: center;
    }
</style>
<script>

    $(function(){

        $('#tel').on('blur',function(){
            var mobile = $('#tel').val();
            var reg_mobile = /^(1(([357][0-9])|(47)|[8][0-9]))\d{8}$/;
            if (mobile == '') {
                // $('#tel').val('请输入您的手机号码');
            } else if (!reg_mobile.test(mobile)) {
                alert('请填写正确的手机号')
                // $('#error').html('请填写正确的手机号');
            } else {
                $('#error').html('');
            }
        })


        // 验证密码是否输入
        var  apppwd1 = ''
        var  apppwd2 = ''
        $('#apppwd1').on('blur',function(){
             apppwd1 = $(this).val()
            if($.trim(apppwd1) == '') {
                alert('请输入密码')
            }
        })
        $('#apppwd2').on('blur',function(){
            apppwd2 = $(this).val()
            if($.trim(apppwd2) !== '') {
                if(apppwd2 !== apppwd1) {
                    alert('两次输入的密码不一样')
                }
            }else {
                alert('请输入密码')
            }
        })



        // 验证码定时器
        var setId;
        function setadd(){
            var count = 60
            setId = setInterval(function(){
                --count
                $('#count').text(count+'s后重新发送')
                if(count == 0) {
                    clearInterval(setId)
                    $('#getData').css('display','inline-block').text('重新获取验证码')
                    $('#count').css('display','none')
                }
            },1000)
        }

        // 获取手机验证码
        $('#getData').on('click',function(){
            var mobile = $('#tel').val();
            var reg_mobile = /^(1(([357][0-9])|(47)|[8][0-9]))\d{8}$/;
            if (!reg_mobile.test(mobile)) {
                // $('#error').html('请填写正确的手机号');
                alert("请填写正确的手机号")
                return false;
            } else {
                $.ajax({
                    url:'https://app.xiaoyichuxing.net/index.php?s=/User/verifyphone.html',
                    type:'post',
                    dataType:'json',
                    data:{
                        tel:mobile
                    },
                    success:function(res){
                        if(res.code == 1) {
                            $('#getData').css('display','none')
                            $('#count').css('display','inline-block')
                            setadd()
                        } else {
                            alert(res.msg)
                        }
                        console.log(res)
                    }
                })
            }
        })

        // 提交注册
        $('.regist_now').on('click',function(){

            var mobile = $('#tel').val();
            var code = $('#code').val();
            var reg_code = /^[0-9]{6}$/;
            var reg_mobile = /^(1(([357][0-9])|(47)|[8][0-9]))\d{8}$/;
            $('#error').html('');

            if (!reg_mobile.test(mobile)) {
                // $('#error').html('请填写正确的手机号');
                alert("请填写正确的手机号")
                return false;
            }

            if($.trim(apppwd2) !== '' && $.trim(apppwd2) !== '') {
                if(apppwd2 !== apppwd1) {
                    alert('两次输入的密码不一样')
                    return false;
                }
            }else {
                alert('请输入密码')
                return false;
            }
            if($.trim(code) == '') {
                alert('请输入验证码')
                return false;
            }
            $.ajax({
                url:'https://app.xiaoyichuxing.net/index.php?s=/Index/register.html',
                type:'post',
                dataType:'json',
                data:{
                    tel:mobile,
                    password:apppwd1,
                    verify:code,
                    repassword:apppwd2
                },
                success:function(res){
                    console.log(res)
                    if(res.code ==0) {
                        alert(res.msg)
                    } else {
                        // 跳转到登陆页面
                        alert(res.msg)
                        window.location.href = 'index.php?s=/Index/blogin'
                    }
                }
            })

            return false;

        })
    })


</script>
<body>
<body style="max-width:100%; max-height:100%;">
<div class="blogo">
    <h4>注册</h4>
    <p>欢迎注册小易出行-乘客端</p>
    <!-- <img src="/Public/xiaoyi.png" alt=""> -->
</div>
<!--<div class="top2">修改个人信息</div>-->
<div class="tabs">
    <form action="" method="post" id="tab">
        <!-- <input type="hidden" name="code" value="">
        <input type="hidden" name="url" id="url" value="Orders/stepOne"> -->
        <!--<div class="youhui">★微信支付立减20元★</div>-->
        <div class="reg_conText">
            <div class="reg">

                <input type="tel" name="tel" id="tel" style="color:#ccc;margin-left: 0" maxlength="11" value="<?php echo ($user['tel']); ?>"
                        placeholder="请输入手机号码注册" />

            </div>
            <div class="reg">

                <input type="password" name="apppwd" id="apppwd1" style="color:#ccc;margin-left: 0" maxlength="11" value=""
                         placeholder="请输入8-16位数字加字母的密码" />

            </div>
            <div class="reg">
                <input type="password" name="apppwd" id="apppwd2" style="color:#ccc;margin-left: 0" maxlength="11" value=""
                        placeholder="请输入8-16位数字加字母的密码" />
            </div>
            <div class="reg">
                <input class="vertify" type="text" name="code" id="code" style="width:50%;color:#ccc;margin-left: 0"
                       placeholder="请先输入验证码" maxlength="6" >
                <span class="reg_code"  id="getData">获取验证码</span>
                <span class="reg_code" style="display: none"  id="count"></span>
            </div>
            <!--  <div class="reg">
                <img src="/Public/images/tubiao_072.png" style="margin-top:5px;">
                <input type="tel" name="verify_code" id="code" style="color:#ccc;" value="请输入验证码" maxlength="6" onclick="if(this.value=='请输入验证码'){this.value=''}">
                <div class="btn_yanzheng" id="getCodeBtn" onclick="getCode()">获取验证码</div>
                        <div class="btn_yanzheng" id="getCodeBtn2" style="display:none"></div>
                <div class="string2"></div>
            </div>-->
        </div>
        <div class="register">
            <!-- <div id="error" class="login" style="margin-top:0;"></div> -->
            <br>
            <div class="regist_now" style="width:90%;border-radius: 50px">提交</div>
            <div class="agreement">注册即表示同意<a href="index.php?s=/Index/agreement" class="reg_code" >《用户协议》</a>和<a href="index.php?s=/Index/privacy" class="reg_code" >《隐私条款》</a></div>

        </div>
    </form>
</div>

</body>
</html>
=======
    <meta charset="UTF-8">
    <title>1111</title>
</head>
<body>1
1111111111
</body>
</html>x
>>>>>>> 8f465a878d1b207398798856e3e2b1221e13f893